package cn.wk.libs4a.view.phonecontact;

import net.tsz.afinal.annotation.sqlite.Id;
import net.tsz.afinal.annotation.sqlite.Transient;
import android.graphics.Bitmap;

/**
 * 联系人
 */

public class WKPhoneContactBean {

	@Id(column = "contactId")
	private int contactId;
	private String name;
	private String phoneNo;
	private boolean hasAvatar = false;
	private String imgKey;

	private String pinyinName;

	public String getPinyinName() {
		return pinyinName;
	}

	public void setPinyinName(String pinyinName) {
		this.pinyinName = pinyinName;
	}

	public String getImgKey() {
		return imgKey;
	}

	public void setImgKey(String imgKey) {
		this.imgKey = imgKey;
	}

	public boolean isHasAvatar() {
		return hasAvatar;
	}

	public void setHasAvatar(boolean hasAvatar) {
		this.hasAvatar = hasAvatar;
	}

	@Transient
	private Bitmap avatar;

	public Bitmap getAvatar() {
		return avatar;
	}

	public void setAvatar(Bitmap avatar) {
		this.avatar = avatar;
	}

	public WKPhoneContactBean() {
		super();
	}

	public WKPhoneContactBean(int contactId, String name, String phoneNo) {
		super();
		this.contactId = contactId;
		this.name = name;
		this.phoneNo = phoneNo;

		pinyinName = WKPhoneContactUtils.getPingYin(name).toUpperCase();
	}

	public void initAvatar(Bitmap a) {
		this.avatar = a;
	}

	public int getContactId() {
		return contactId;
	}

	public void setContactId(int contactId) {
		this.contactId = contactId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhoneNo() {
		return phoneNo;
	}

	public void setPhoneNo(String phoneNo) {
		this.phoneNo = phoneNo;
	}

}
